'''
元组嵌套使用
'''
metro_areas = [
    ('a', 'jp', 36, (35, 139)),
    ('b', 'in', 21, (28, 77)),
    ('c', 'mx', 20, (19, -99)),
    ('d', 'us', 20, (40, -74)),
    ('e', 'br', 19, (-23, -46)),
]

print('{:15} | {:^9} | {:^9}'.format('', 'lat.', 'long.'))
fmt = '{:15} | {:9.4f} | {:9.4f}'
for name, cc, pop, (latitude, longitude) in metro_areas:
    if longitude <= 0:
        print(fmt.format(name, latitude, longitude))

if __name__ == '__main__':
    print(1)
